﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WinnerCMS.Data.Mapping
{
    public partial class ContentPropertyMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.ContentProperty>
    {
        public ContentPropertyMap()
        {
            // table
            //ToTable("CMS_ContentProperty");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.ModelId)
                
                .IsRequired();
            Property(t => t.Name)
                
                .HasMaxLength(50)
                .IsRequired();
            Property(t => t.UpDateTime)
                
                .IsRequired();
            Property(t => t.Type)
                
                .IsRequired();

            // Relationships

            //InitializeMapping();
        }
    }
}

